package net.rock.pojo;

import com.fasterxml.jackson.annotation.JsonGetter;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;

@ToString
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode
public class Address {
    private int id;
    private int userId;
    private String address;
    private boolean isDefault;

    public int getId() {
        return id;
    }

    public int getUserId() {
        return userId;
    }

    public String getAddress() {
        return address;
    }

    @JsonGetter("isDefault")
    public boolean isDefault() {
        return isDefault;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setIsDefault(boolean aDefault) {
        isDefault = aDefault;
    }
}
